<link rel="stylesheet" type="text/css" href="assets/bootstrap-datepicker/css/datepicker.css" />

<!-- 主页-入职管理 -->
<section id="container">
    <!--main content start-->
    <section id="main-content">
        <section class="wrapper">
            <!--state overview end-->
            <div class="row">
                <div class="col-lg-12">
                    <section class="panel">
                        <header class="panel-heading">
                            入职信息
                        </header>
                        <div class="panel-body">
                            <div class="form-group customerForm rzcomSelect" >
                                <label class="col-sm-2 control-label">常驻公司</label>
                                <div class="col-sm-10">
                                    <select class="form-control" certus-required  ng-model="rzlcStepEntity.baseUser.belongCompanyCode" disabled>
                                        <option ng-repeat="cps in belongCompanyCodeSelect" value="{{cps.code}}">{{cps.name}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">入职部门</label>
                                <div class="col-sm-10">
                                    <input type="text"  class="form-control" disabled certus-required ng-model="rzlcStepEntity.baseUser.departmentUser.departmentName">
                                </div>
                            </div>

                            <div class="form-group customerForm rzcomSelect" id="rzcomSelectId1">
                                <label class="col-sm-2 control-label">是否自带电脑</label>
                                <div class="col-sm-10">
                                    <input type="text"  class="form-control" disabled certus-required ng-model="rzlcStepEntity.baseUser.sfzddn">
                                </div>
                            </div>

                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">拟入职时间</label>
                                <div class="col-sm-10">
                                    <input type="text" id="jiTime1" class="form-control"  certus-required ng-model="rzlcStepEntity.baseUser.readyToWork">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">直接领导</label>
                                <div class="col-sm-10">
                                    <input type="text" list="browsers" class="form-control" disabled certus-required ng-model="rzlcStepEntity.baseUser.leaderName" placeholder="自动检索，查询结果较多时候，系统不显示，需要尽量多输入相关字段">
                                    <datalist id="browsers" ng-model="selected">
                                        <option ng-repeat="x in leaderNameSelect" value="{{x.userName}}">
                                    </datalist>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">岗位名称</label>
                                <div class="col-sm-10">
                                    <input type="text" certus-an-limit-length="20" disabled certus-required ng-model="rzlcStepEntity.baseUser.positonName" class="form-control">
                                </div>
                            </div>

                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">员工姓名(中文)</label>
                                <div class="col-sm-10">
                                    <input type="text" certus-an-limit-length="20" disabled certus-required ng-model="rzlcStepEntity.baseUser.userName" class="form-control">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">性别</label>
                                <div class="col-sm-10">
                                    <select class="form-control" certus-required ng-model="rzlcStepEntity.baseUser.sex" disabled>
                                        <option ng-repeat="ss in sexSelect" value="{{ss.code}}">{{ss.name}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">出生日期*</label>
                                <div class="col-sm-10">
                                    <input type="text" value="" class="form-control" id="birTime" ng-model="rzlcStepEntity.baseUser.birthday" disabled>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">婚姻状况</label>
                                <div class="col-sm-10">
                                    <select class="form-control" ng-model="rzlcStepEntity.baseUser.isMarriage" disabled>
                                        <option ng-repeat="ms in marriageSelect" value="{{ms.code}}">{{ms.name}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">联系方式1</label>
                                <div class="col-sm-10">
                                    <input type="text" value="" onblur="telNo(this.id)" id="tellNo1" certus-required class="form-control" ng-model="rzlcStepEntity.baseUser.phoneNumber" disabled>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">首次参加工作时间*</label>
                                <div class="col-sm-10">
                                    <input type="text" value="" class="form-control" id="firTime" ng-model="rzlcStepEntity.baseUser.firstWorkTime" disabled>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">面试人员</label>
                                <div class="col-sm-10">
                                    <input type="text" list="browsers1" class="form-control" placeholder="自动检索，查询结果较多时候，系统不显示，需要尽量多输入相关字段" ng-model="rzlcStepEntity.interviewerManName" disabled>
                                    <datalist id="browsers1" ng-model="selected">
                                        <option ng-repeat="ina in interviewerNameSelect" value="{{ina.userName}}">
                                    </datalist>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">英文名</label>
                                <div class="col-sm-10">
                                    <input type="text"  class="form-control" ng-model="rzlcStepEntity.baseUser.englishName" disabled>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">常驻地址</label>
                                <div class="col-sm-10">
                                    <input type="text" value="" class="form-control" certus-an-limit-length="50" certus-required ng-model="rzlcStepEntity.baseUser.basedArea" disabled>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">居住地(地址)</label>
                                <div class="col-sm-10">
                                    <input type="text" value="" certus-an-limit-length="50" class="form-control" ng-model="rzlcStepEntity.baseUser.address" disabled>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">联系方式2</label>
                                <div class="col-sm-10">
                                    <input type="text" value="" onblur="telNo(this.id)" id="tellNo2" certus-an-limit-length="50"  ng-model="rzlcStepEntity.baseUser.phoneNumber1" class="form-control" disabled>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">个人邮箱</label>
                                <div class="col-sm-10">
                                    <input type="text" value="" certus-required class="form-control" ng-model="rzlcStepEntity.baseUser.personalEmail" disabled>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">备注说明</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control"  certus-an-limit-length="50" certus-required ng-model="rzlcStepEntity.opinionMsg" disabled></textarea>
                                </div>
                            </div>
                        </div>
                    </section>
                    <section class="panel">
                        <div class="panel-body">
                            <p class="default-buttons">
                                <a href="javascript:void(0);" class="button-back btn btn-info" onclick="window.history.back()">返回</a>
                                <a href="javascript:void(0);" class="button-next  btn btn-success btn-l10" ng-click="alterReadyToWork()">确认提交</a>
                            </p>
                        </div>
                    </section>
                </div>
            </div>
        </section>
    </section>
    <!--main content end-->
</section>

<div  ng-include="'templates/workflow/scheduled/processs.html'"></div>
<!-- 流程跟踪展示效果 -->
<section class="hdaper">
    <div class="panel">
        <div class="panel-heading add-heading">
            流程跟踪
            <i class="add-icon icon-remove" href="javascript:$.pageslide.close()" onclick="hdaper();"></i>
        </div>
        <div class="panel-body panel-proce">
            <div class="proce-middle">
                <div class="proce-log" ng-repeat="trace in processCCBXTrace" ng-init="data=trace.msg">
                    <div class="proce-log-lf">
                        <!-- 虚线 -->
                        <div class="log-dashed"></div>
                    </div>
                    <div class="proce-log-rg">
                        <!-- 节点 -->
                        <div class="log-mark">
                            <!-- 标记点 -->
                            <div ng-if="trace.isHead == 'headNode' && $index == 0">
                                <div class="log-mark-icon mark-prime">
                                    发起
                                </div>
                            </div>
                            <div ng-if="trace.lastStatus == 'sentback' && trace.beSentBack == 'Y'">
                                <div class="log-mark-icon mark-prime"> 发起</div>
                            </div>
                            <div ng-if="trace.lastStatus == 'sentback' && trace.beSentBack == 'N'">
                                <div class="log-mark-icon mark-warning"> 被退回</div>
                            </div>
                            <div ng-if="trace.lastStatus == 'sentback' && trace.beSentBack == 'N'">                                <div class="log-mark-icon mark-warning"> 被退回</div>                            </div>                            <div ng-if="trace.lastStatus == 'denied'">
                            <div class="log-mark-icon mark-warning"> 回退</div>
                        </div>
                            <div ng-if="trace.lastStatus == 'completed'&& $index != 0">
                                <div class="log-mark-icon mark-success">
                                    同意
                                </div>
                            </div>
                            <div ng-if="trace.lastStatus == 'others'&& $index != 0">
                                <div class="log-mark-icon mark-success">
                                    完成
                                </div>
                            </div>
                            <div ng-if="trace.lastStatus == 'approvaling' && $index != 0">
                                <div class="log-mark-icon mark-blue">
                                    办理
                                </div>
                            </div>
                            <div ng-if="trace.lastStatus == 'terminated' && $index != 0 && trace.isEnd != 'endNode'">
                                <div class="log-mark-icon mark-danger">
                                    拒绝
                                </div>
                            </div>
                            <div ng-if="trace.isEnd == 'endNode'&& $index != 0 && trace.lastStatus == 'terminated'">
                                <div class="log-mark-icon">
                                    结束
                                </div>
                            </div>
                            <!-- 对话框箭头 -->
                            <div class="log-tag"></div>
                            <!-- 节点内容 -->
                            <div class="log-mark-value">
                                <div class="log-mtitle">
                                    <span class="log-time">{{trace.time | date:'yyyy-MM-dd hh:mm'}}</span>

                                    <div ng-if="trace.lastStatus == 'approvaling' && trace.isHead != 'headNode' ">
                                        <span class="log-status">状态：任务执行中
                                            <i class="status-blue"></i>
                                        </span>
                                    </div>

                                    <div ng-if="trace.lastStatus == 'sentback' || trace.lastStatus == 'N'"><span
                                            class="log-status">状态：已经被退回                                                                <i></i>                                                            </span>
                                    </div>
                                    <div ng-if="trace.lastStatus == 'sentback' || trace.sendBack == 'Y'"><span
                                            class="log-status">状态：正在重新提交                                                                <i></i>                                                            </span>
                                    </div>
                                    <div ng-if="trace.lastStatus == 'completed' || trace.lastStatus == 'terminated' || trace.lastStatus == 'denied'">
                                        <span class="log-status">状态：任务执行完毕
                                            <i></i>
                                        </span>
                                    </div>

                                    <div ng-if="trace.isHead == 'headNode' && trace.lastStatus == 'sentback'">
                                        <span class="log-status">状态：任务被退回至起草人
                                            <i></i>
                                        </span>
                                    </div>

                                    <div ng-if="trace.isHead != 'headNode' && trace.lastStatus == 'sentback'">
                                        <span class="log-status">状态：被退回
                                            <i></i>
                                        </span>
                                    </div>

                                    <div ng-if="trace.isHead == 'headNode' && trace.lastStatus == 'approvaling'">
                                        <span class="log-status">状态：子流程执行中
                                            <i class="status-purple"></i>
                                        </span>
                                    </div>
                                </div>
                                <div class="log-mbody">
                                    <span class="log-name">办理人：{{trace.USER}}</span>
                                    <span class="tp-txt">审批意见：数据暂无</span>
                                    <input type="hidden" value="{{trace.msg}}" class="msgss"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="paper-bg" onclick="clsbox();"></div>
</section>

<script type="text/javascript" src="assets/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript">

    $("#birTime").datepicker({
        format: 'yyyy-mm-dd'
    }).on('dp.change', function (e) {
        var result = new moment(e.date).format('YYYY-MM-DD');
        if (result && !angular.isUndefined(result)) {
            $$scope.rzlcStepEntity.baseUser.birthday = result;
            $$scope.$apply();
        }
    });

    $("#firTime").datepicker({
        format: 'yyyy-mm-dd'
    }).on('dp.change', function (e) {
        var result = new moment(e.date).format('YYYY-MM-DD');
        if (result && !angular.isUndefined(result)) {
            $$scope.rzlcStepEntity.firstWorkTime = result;
            $$scope.$apply();
        }
    });
</script>
<script type="text/javascript" src="js/ind/ind.js"></script>
<!--
<script type="text/javascript" src="js/proinfo/addNewUser/hrApply-BSB.js"></script>-->
